package com.xxl.job.admin.util;


import org.springframework.util.StringUtils;

public class DataSourceUtil {
    private static String DbType = "mysql";

    public static String getDbType() {
        return DbType;
    }

    public static void setDbType(String jdbcUrl) {
        if (StringUtils.isEmpty(jdbcUrl)) {
            return;
        }

        if (jdbcUrl.contains(":sqlite:")) {
            DataSourceUtil.DbType = "sqlite";
        } else {
            DataSourceUtil.DbType = "mysql";
        }
    }

}
